home *** CD-ROM | disk | FTP | other *** search
- @Echo off
- Rem Zip2zipC.Bat (Called by Zip2zipB.Bat)
- Rem %1 is starting sub dir; D:\subdir\ (Has Trailing "\")
- Rem %2 is %1Z_B\Zip Within orig by ZIP2ZIPB.BAT's Call ZIP2ZIPC %1 %%f
- Rem ..Add/Change -options for Strip/Add Comment File, Logo etc.
-
- Echo Zip2ZipC Executing..Working on %2
-
- Set CNZL=
- IF Exist %1Z_B\CNZL.FLG Set CNZL=Y
- IF Exist %1Z_B\CNZL.FLG GoTo Done
-
- IF NOT "%DONE_B%"=="" GoTo End
-
- PKUNZIP %2 -t >Nul
- IF Errorlevel 1 GoTo Error
-
- Call ZIP2-ZNP.BAT %2
- IF "%FSIZE%"=="" GoTo MajorError
- IF "%FSIZE%"=="0" GoTo UN_ZIP
-
- Set CNZL=Y
- Echo %CNZL% >%1Z_B\CNZL.FLG
- Echo %2 Contains a .ZIP file In Path. >>%1ZIP2ZIP.LOG
- Echo %2 Failed. See ZIP2ZIP.LOG
- GoTo Done
-
- :UN_ZIP
- PKunZip %2 -d -Jhrs %1Z_B\Z_C
- IF Errorlevel 1 GoTo Error
- IF NoT Exist %1Z_B\Z_C\*.ZIP GoTo RE_ZIP
-
- Rem ======================================================
- DIR %1Z_B\Z_C\*.ZIP | Find /C " ZIP " >#2DO_C.
- For %%f in (%1Z_B\Z_C\*.ZIP) DO Call ZIP2ZIPD.BAT %1 %%f
- Rem ======================================================
- IF "%SAFETY%"=="" GoTo End
- IF Exist %1Z_B\CNZL.FLG Set CNZL=Y
- IF Exist %1Z_B\CNZL.FLG GoTo Done
-
- :RE_ZIP
- PKZip %2 -k -mrp -ex -Jhrs -wHS %1Z_B\Z_C\*.*
- IF Errorlevel 1 GoTo Error
- Echo %2 Converted ok at 2nd level >>%1ZIP2ZIP.LOG
- GoTo Done
-
- :MajorError
- Echo Major Logic Error. Do NOT Continue.
- Set CNZL=Y
- Echo %CNZL% >%1Z_B\CNZL.FLG
- IF "%Safety%"=="" GoTo End
- Echo Cancel With ^C (Control C)...Or...
- Pause
- Set Safety=
- GoTo End
-
- :Error
- Echo %2 Failed...PKZIP or PKUNZIP Encountered an Error in 2nd Lev.>>%1ZIP2ZIP.LOG
- Set CNZL=Y
- Echo %CNZL% >%1Z_B\CNZL.FLG
-
- :Done
- Call ZIP2ZMOP.BAT %1 Z_B Z_C %CNZL%
-
- Echo %2 >>#AT_B.
- Type #AT_B. | FIND /C ".ZIP" >#DONE_B.
- Echo N| COMP #2DO_B. #DONE_B. | FIND "OK" >ZIP2-FSZ.
- CALL ZIP2-FSZ.BAT
- IF "%FSIZE%"=="" GoTo MajorError
- IF "%FSIZE%"=="0" GoTo End
- Set DONE_B=Y
-
- :End
- For %%f IN (#2DO_C. #DONE_C. #AT_C.) DO IF Exist %%f Del %%f >Nul
- Set DONE_C=
-